<?php
if(!ROOT){
	exit('Access denied');
}
#数据库删除表
$query=array();
$query[]="DROP TABLE ".DB_PREFIX."content_article;";
$query[]="DROP TABLE ".DB_PREFIX."content_category;";
$query[]="DROP TABLE ".DB_PREFIX."content_comment;";
$query[]="DROP TABLE ".DB_PREFIX."content_draft;";
#执行命令
if(count($query)>0){
	foreach($query as $sql){
		$this->db->query($sql);
	}
}
#删除配置项
$this->db->delete(DB_PREFIX."config","config_type='content'");
rm_dir('./content');
$template_admin=array(
	'content.config',
	'content.article.info',
	'content.article.list',
	'content.comment.info',
	'content.comment.list',
	'content.category.info',
	'content.category.list',
	'content.draft.list'
);
foreach($template_admin as $v){
	@unlink(ROOT."/core/themes/admin/".$v.".php");
}
$template_front=array(
	'content.view',
	'content.list',
	'content.more',
	'content.comment',
	'content.search',
	'content.draft'
);
foreach($template_front as $v){
	@unlink(ROOT."/core/themes/".read_cache('default_theme')."/".$v.".php");
}